//2009/07/29 20:15:35
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>

using namespace std;

class ProfitCalculator
{
public:
    int percent(vector <string> items)
	{
		double sold = 0;
		double amount = 0;
		for(int i=0; i<items.size(); i++)
		{
			stringstream s(items.at(i));
			double a;
			s >> a;
			sold += a;
			s >> a;
			amount += a;
		}
		return (int) ((sold - amount)*100/sold);
	}
};
